home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / WINWORDS / COLLEC.ZIP / README.TXT < prev   
Text File  |  1993-06-28  |  8KB  |  170 lines

  1. This is a set of Word for Windows macros to do something Word doesn't
  2. let you do easily, and which is sorely missed by anyone developing a
  3. Help system.  If you don't know how to install a macro into your
  4. template, see the last section.
  5.  
  6. If you know how to work with macros (even just a little), you might just
  7. want to install the macros in NORMAL.DOT and see they do.  You can
  8. always read this later.  Run Collector first, then KeyCollector, then
  9. KeyThing.
  10.  
  11. David DelGreco
  12. ------------------------------------------------
  13.  
  14. If you haven't kept track of all those footnotes you've been entering
  15. (or if you tried, but you're not so sure about its accuracy), you're
  16. eventually going to wish you had.
  17.  
  18. I often work as a firefighter in my company.  I've worked on two Help
  19. systems now, each of which was comprised of 23 files (just a
  20. coincidence).  One had 600 topics, the other had over 800.  In both
  21. cases, someone else did the bulk of the work and became very familiar
  22. with the file by working with it.  But, not having worked with the files
  23. before, I needed a way to create a "map" of the files.  So I wrote these
  24. macros.  It was a two-day job, followed by two weeks of getting around
  25. bugs in WinWord and WordBasic.  But that's another story...
  26.  
  27. The end result is a comma-delimited file which can be imported into any
  28. spreadsheet or database, or even Word, if you know how to work with
  29. macros.
  30.  
  31. Collector       This is the main macro.  It searches for any .HPJ files
  32. (fcollect.txt)  on your disk, puts them in a list, and lets you select
  33.                 the one from which you want the footnotes. Then it reads
  34.                 the .HPJ file to get the name of the files in your help
  35.                 project.
  36.   
  37.                 If you're using the WHAT templates, RoboHelp, or another
  38.                 Help development system, you may have both .DOC and .RTF
  39.                 files. COLLECTOR gives you the option of reading the
  40.                 .DOC files (much faster!) or the .RTF files.  Then it
  41.                 goes through and parses out the footnotes.
  42.  
  43.                 It knows about all the footnotes currently supported by
  44.                 the WinHelp engine in Win 3.1, including build tags,
  45.                 topic-entry macros, comments, et al.
  46.  
  47.                 Keywords are stored as a single field, with all the
  48.                 entries and semi-colons embedded within it.  Originally
  49.                 I did this just to get the rest of the macro working,
  50.                 but ran into so many memory problems I left this as a
  51.                 separate macro (KeyCollector, see below).
  52.  
  53.                 At this time, it doesn't deal with multiple keyword
  54.                 footnotes, nor with alternate keyword entries.
  55.  
  56.                 CAVEAT ABOUT MEMORY!!!  When I first created the macro,
  57.                 it kept running out of memory if you ran it on more than
  58.                 7 files. Apparently every instance of copying, pasting,
  59.                 or deleting causes Word to lose a little memory.  I was
  60.                 doing a lot of that, and paid the price. I rewrote the
  61.                 macro to avoid any editing functions, except for a
  62.                 couple of situations I couldn't get around, and
  63.                 immediately was able to run the macro on 16 of the 23
  64.                 files.
  65.  
  66.                 I've worked on it some more, and only have memory
  67.                 problems on one set of files now.  Funny thing:  both my
  68.                 large projects have 23 files, yet COLLECTOR goes through
  69.                 one without problem, and stops after 16 files on the
  70.                 other.  SysMeter says it's not really running out of
  71.                 memory anymore, but I've given up on further solutions.
  72.  
  73.                 (6/28) You won't have this problem if you upgrade to
  74.                 WinWord 2.0c.  A lot of bugs have been fixed in that
  75.                 release.
  76.  
  77. FootnoteReader  This is a macro which will read in TRACKER.CSV and make
  78. (fread.txt)     a table out of it.  It turns out to be faster to load it
  79.                 into Excel, save it as a spreadsheet, and load the
  80.                 spreadsheet into Word.  But it's less hassle (one
  81.                 command!) to just run this macro.
  82.  
  83.                 When it's done, you have to set the table cell sizes
  84.                 yourself, and delete the columns that don't interest
  85.                 you.
  86.  
  87. KeyCollector    Though the keywords are separated by semi-colons, all
  88. (keyword.txt)   keywords for a given topic are stored in TRACKER.CSV as
  89.                 a single field, surrounded by quotes. KeyCollector reads
  90.                 TRACKER.CSV and parses out the keywords.  It writes the
  91.                 keywords to the file KEYS.CSV.
  92.  
  93.                 Though it reads all the fields, it only writes out the
  94.                 keyword, topic title, and filename on each line.  I
  95.                 found this more convenient to work with.  If you want to
  96.                 write out all the info, just locate the REM statements
  97.                 in the macro and change them as described there.
  98.  
  99.                 CAVEAT:  It chokes on lines with more than 255
  100.                 characters in it.  Whether this is a problem depends
  101.                 entirely on how many key words you use.
  102.  
  103.                 If you have keyword entries longer than 255 characters,
  104.                 you will find fields in KEYS.CSV with "String too long
  105.                 error" as the keyword entry.
  106.  
  107.                 To get around this, you can use KEYS.BAS (see below).
  108.  
  109.                 OTHER CAVEAT:  It sometimes runs out of memory on my
  110.                 largest files for no good reason I can see.  Try
  111.                 KEYS.BAS.
  112.  
  113. KEYS.EXE        Same as above, but is a QuickBasic program.  It runs
  114.                 MUCH more quickly than the WordBasic macro, won't choke
  115.                 if you have more than 255 characters on a line, and you
  116.                 can run it in a DOS window so it's not a big hassle.
  117.  
  118.                 To install and use it:
  119.                 1)  Go to a DOS prompt or a DOS window.
  120.  
  121.                 2)  Copy KEYS.EXE to the directory where TRACKER.CSV is located.
  122.  
  123.                 3)  Type "keys".
  124.  
  125.                 The file KEYS.CSV appears in the directory.
  126.  
  127. KeyThing        I wrote this macro on the spur of the moment.  It just
  128. (keything.txt)  reads KEYS.CSV and puts it in a Word document.  It adds
  129.                 titles, sets up good tab and paragraph settings, and has
  130.                 an option to sort the file by keyword.  It's faster than
  131.                 a spreadsheet, and very easy to change to suit your
  132.                 needs.
  133.  
  134.  
  135. INSTALLING A MACRO INTO A WORD FOR WINDOWS TEMPLATE
  136.  
  137. In this example, we'll install FCOLLECT.TXT as the macro Collector:
  138.  
  139. 1)  Start Word.
  140.  
  141. 2)  Choose the File menu, then Open, and open FCOLLECT.TXT.
  142.  
  143. 3)  Press Ctrl-Shift-End (that is, press Ctrl, hold it down while
  144.     pressing Shift, then hold them both down while pressing End).
  145.  
  146.     The entire document is selected.
  147.  
  148. 4)  Press Ctrl-Insert.
  149.  
  150.     The text is now copied to the Clipboard.
  151.  
  152. 5)  Choose the Tools menu, then Macro.
  153.  
  154. 6)  In the dialog box, type Collector
  155.  
  156.     Make sure Global is selected in the lower right corner.
  157.  
  158. 7)  Click Edit.
  159.  
  160. 8)  A new macro document appears.
  161.  
  162. 9)  Press Ctrl-Home, then Ctrl-Shift-End, then Shift-Ins.
  163.  
  164.     The text is replaced by the text from FCOLLECT.TXT.
  165.  
  166. 10) Press Ctrl-F4 to close the document, and click Yes when asked if you
  167.     want to keep the changes.
  168.  
  169. 11) Repeat for the other macros.
  170.